package com.dudy;

import java.util.Observable;
import java.util.Observer;

/**
 * @author <a href="mailto:zjw2023@163.com">zjw2023</a>
 * @version 1.0
 * @Description
 * @Since 2016/5/23
 */
public class Observer1 implements Observer {
    @Override
    public void update(Observable o, Object arg) {
        if(o instanceof SubjectObservable){
            System.out.println("update name of Observer1 is "+((SubjectObservable) o).getName());
        }
    }
}
